import request from '@/router/axios';
import {
  baseUrl
} from '@/config/env';

export const getpages = (page, limit, params) => {
  return request({
    url: baseUrl + '/api/MisLogisticsShelf/getpages',
    method: 'get',
    params: {
      key: params.key == undefined ? '' : params.key,
      page,
      limit
    }
  })
}
export const detail = (id) => {
  return request({
    url: baseUrl + '/api/MisLogisticsShelf/detail',
    method: 'get',
    params: {
      id,
    }
  })
}
export const add = (row) => {
  return request({
    url: baseUrl + '/api/MisLogisticsShelf/add',
    method: 'post',
    data: row
  })
}

export const edit = (row) => {
  return request({
    url: baseUrl + '/api/MisLogisticsShelf/edit',
    method: 'post',
    data: row
  })
}
export const remove = (ids) => {
  return request({
    url: baseUrl + '/api/MisLogisticsShelf/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const qrcode = (url, title) => {
  return request({
    url: baseUrl + '/api/MisLogisticsShelf/qrcode',
    method: 'get',
    params: {
      url,
      title
    }
  })
}
